package CardLayoutTest;


import java.awt.Canvas;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;


public class PaintImg extends Canvas {


  private Toolkit toolkit;
  private Image img;

  PaintImg(String str){

   toolkit = Toolkit.getDefaultToolkit();
   img = toolkit.getImage(str);

  }

  @Override

  public void paint(Graphics g) {

   g.drawImage(img, 0, 0, 800, 600, this);

  }




}



